﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CadastroConsultoria.aspx.cs" Inherits="PortalCurriculo.WebUI.Empresas.CadastroConsultoria" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="PortalCurriculo.Util.CustomControls" Namespace="PortalCurriculo.Util.CustomControls" TagPrefix="portal" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageTitle" runat="server">
    <asp:Label runat="server" ID="lblPageTitle" Text="Cadastro de consultorias" CssClass="pageTitle" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel runat="server" ID="UpdatePanelConsultoria" >
        <ContentTemplate>
            <asp:Panel runat="server" ID="pnlPesquisa" GroupingText="Pesquisa" 
                DefaultButton="lnkPesquisar">
                <table cellspacing="10px">
                    <tr>
                        <td><asp:Label ID="lblNome" runat="server" Text="Nome ou razão social da consultoria" /></td>
                        <td style="margin-left: 40px;"><asp:TextBox ID="txtNome" runat="server" MaxLength="70" /></td>
                    </tr>
                    <tr>
                        <td><asp:Label ID="lblCNPJ" runat="server" Text="CNPJ" /></td>
                        <td>
                            <asp:TextBox ID="txtCNPJ" runat="server" />
                            <portal:MaskedEdit ID="mskCNPJ" runat="server" Type="CNPJ" TargetControlID="txtCNPJ" /> 
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:LinkButton runat="server" ID="lnkPesquisar" Text="Pesquisar consultorias" OnClick="lnkPesquisar_Click" />
                        </td>
                    </tr>
                </table>
                <portal:ListView ID="lsvConsultoriaPesquisa" runat="server" ItemPlaceholderID="phItens" OnItemDataBound="lsvConsultoriaPesquisa_ItemDataBound">
                    <LayoutTemplate>
                        <asp:Label runat="server" ID="lblPesquisa" Text="Foi(ram) encontrado(s) a(s) consultoria(s) abaixo:" CssClass="title" /> 
                        <br /><br />
                        <table width="100%">
                            <tr>    
                                <td style="width:35%;text-align:center;"><asp:Label runat="server" ID="lblNome" Text="Nome" /></td>
                                <td style="width:40%;text-align:center;"><asp:Label runat="server" ID="lblSite" Text="Site / Email" /></td>
                                <td style="width:20%;text-align:center;"><asp:Label runat="server" ID="lblTelefone" Text="Telefone" /></td>
                                <td style="width:15px;text-align:center;"><asp:Label runat="server" ID="lblAdicionar" /></td>
                            <asp:PlaceHolder ID="phItens" runat="server" />
                        </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr>
                            <td><asp:Label runat="server" ID="lblNome" /></td>
                            <td>
                                <asp:Label runat="server" ID="lblSite" /><br />
                                <asp:Label runat="server" ID="lblEmail" />
                            </td>
                            <td><asp:Label runat="server" ID="lblTelefone" /></td>
                            <td style="text-align:center;">
                                <asp:ImageButton runat="server" ID="imbAdicionar" ImageUrl="~/Files/Layout/Adicionar.gif" AlternateText="Adicionar consultoria"
                                OnClick="imbAdicionar_Click" /> 
                            </td>
                        </tr>
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <asp:Label runat="server" ID="lblVazio" Text="Não foram encontradas consultorias com os critérios acima." CssClass="failureNotification" />
                    </EmptyDataTemplate>
                </portal:ListView>
            </asp:Panel>
            <br />
            <asp:Label runat="server" ID="lblMinhasConsultorias" Text="Minhas consultorias" CssClass="title" /> 
            <br /><br />

            <portal:ListView ID="lsvConsultoria" runat="server" ItemPlaceholderID="phItens" OnItemDataBound="lsvConsultoria_ItemDataBound">
                <LayoutTemplate>
                    <table width="100%">
                        <tr>    
                            <td style="width:35%;text-align:center;"><asp:Label runat="server" ID="lblNome" Text="Nome" /></td>
                            <td style="width:40%;text-align:center;"><asp:Label runat="server" ID="lblSite" Text="Site / Email" /></td>
                            <td style="width:20%;text-align:center;"><asp:Label runat="server" ID="lblTelefone" Text="Telefone" /></td>
                            <td style="width:15px;text-align:center;"><asp:Label runat="server" ID="lblAdicionar" /></td>
                        <asp:PlaceHolder ID="phItens" runat="server" />
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr>
                        <td><asp:Label runat="server" ID="lblNome" /></td>
                        <td>
                            <asp:Label runat="server" ID="lblSite" /><br />
                            <asp:Label runat="server" ID="lblEmail" />
                        </td>
                        <td><asp:Label runat="server" ID="lblTelefone" /></td>
                        <td><asp:ImageButton runat="server" ID="imbExcluir" ImageUrl="~/Files/Layout/Excluir.gif" 
                            OnClick="imbExcluir_Click" OnClientClick="javascript:return confirm('Tem certeza que deseja excluir esse selecionador?');" /> </td>
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <asp:Label runat="server" ID="lblVazio" Text="Não existem consultorias cadastradas." CssClass="failureNotification" />
                </EmptyDataTemplate>
            </portal:ListView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
